//
//  shouhouguanliViewController.m
//  个人信息
//
//  Created by IOSchengxuyuan on 15/12/7.
//  Copyright © 2015年 com.ppfur. All rights reserved.
//

#import "shouhouguanliViewController.h"

@interface shouhouguanliViewController (){
    float aa,bb;
    float width,height;
    UITableViewCell*cell;

}

@end

@implementation shouhouguanliViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _mytable.delegate=self;
    _mytable.dataSource=self;
    width=[UIScreen mainScreen].bounds.size.width;
    height=[UIScreen mainScreen].bounds.size.height;
    aa=width/320;
    bb=height/568;
    _mytable.frame=CGRectMake(0, 0, width, height);
    _mytable.scrollEnabled=NO;
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    if (indexPath.row==0) {
        return 70;
    }else{
        return 60;
    }
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 2;
}

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 1;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString*id=@"row";
    cell=[tableView dequeueReusableCellWithIdentifier:id];
    if(cell==nil)
    {
        cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:id];
    }
    NSArray*row1=[cell.contentView subviews];
//    cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
    for (UIView*vv2 in row1) {
        [vv2 removeFromSuperview];
    }
    if (indexPath.row==0) {
        UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(10*aa, 10, 50*aa, 30)];
        ll1.font=[UIFont systemFontOfSize:13.0f];
        ll1.text=@"da**n";
        ll1.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll1];
        UILabel*ll2=[[UILabel alloc]initWithFrame:CGRectMake(260*aa, 10, 50*aa, 30)];
        ll2.font=[UIFont systemFontOfSize:13.0f];
        ll2.text=@"已处理";
        ll2.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll2];
        UILabel*ll3=[[UILabel alloc]initWithFrame:CGRectMake(10*aa, 38, 220*aa, 30)];
        ll3.font=[UIFont systemFontOfSize:12.0f];
        ll3.text=@"衣服尺码选择错误，要求调换衣服尺码。";
        ll3.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll3];
        UILabel*ll4=[[UILabel alloc]initWithFrame:CGRectMake(245*aa, 38, 80*aa, 30)];
        ll4.font=[UIFont systemFontOfSize:12.0f];
        ll4.text=@"2015-11-11";
        ll4.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll4];
        
    }else{
        UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(10*aa, 10, 50*aa, 30)];
        ll1.font=[UIFont systemFontOfSize:13.0f];
        ll1.text=@"da**n";
        ll1.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll1];
        UILabel*ll2=[[UILabel alloc]initWithFrame:CGRectMake(260*aa, 10, 50*aa, 30)];
        ll2.font=[UIFont systemFontOfSize:13.0f];
        ll2.text=@"未处理";
        ll2.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll2];
        UILabel*ll3=[[UILabel alloc]initWithFrame:CGRectMake(10*aa, 33, 220*aa, 30)];
        ll3.font=[UIFont systemFontOfSize:12.0f];
        ll3.text=@"衣服尺码选择错误，要求调换衣服尺码。";
        ll3.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll3];
        UILabel*ll4=[[UILabel alloc]initWithFrame:CGRectMake(245*aa, 33, 80*aa, 30)];
        ll4.font=[UIFont systemFontOfSize:12.0f];
        ll4.text=@"2015-11-11";
        ll4.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll4];
        
    }
    
    return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
